package com.yulongtian.oneProblemEveryDay.month202212;

/**
 * https://leetcode.cn/problems/check-if-the-sentence-is-pangram/
 * 可
 *
 * @author yulongTian
 * @create 2022-12-13 11:01
 */
public class Test07 {
    public static void main(String[] args) {

    }

    public boolean checkIfPangram(String sentence) {
        int[] chs = new int[26];
        int sum = 0;
        for (int i = 0; i < sentence.length(); i++) {
            char c = sentence.charAt(i);
            if (chs[c - 'a'] == 0) {
                chs[c - 'a']++;
                sum++;
            }
            if (sum == 26) {
                return true;
            }
        }

        return false;
    }
}
